package com.yong.sbd.common.beans.exception;

import lombok.AllArgsConstructor;

/**
 * 通用异常枚举定义
 *
 * @author Kang Yong
 * @date 2025/10/22
 * @since 1.0.0
 */

@AllArgsConstructor
public enum CommonExceptionEnum implements ExceptionEnum {

    // 通用异常枚举
    SUCCESS(3001, "操作成功"),
    FAIL(3002, "操作失败"),
    NO_RESOURCE(3003, "资源找不到"),
    NO_LOGIN(3004, "未登录"),
    NO_PERMISSION(3005, "无功能权限，请联系管理员"),
    TOKEN_REFRESH(3006, "token刷新"),
    PARAM_ERROR(3007, "参数校验错误"),
    NO_PROJECT_PERMISSION(3008, "无项目权限，请联系管理员"),
    NO_CONTRACT_PERMISSION(3009, "无合同权限，请联系管理员"),

    ;

    private Integer code;
    private String msg;

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

}
